package com.yanqu.road.entity.log.hotpotjump;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.log.ServerBaseLog;
import com.yanqu.road.entity.log.maidian.BaseLogEntity;

import java.util.Date;
import java.util.List;

@FieldTypeAnnotation(tableName = "t_l_activity_hotpot_jump_over", desc = "欢跃火锅结算", autoSave = true, dataUpload = true, eventName = "hotpot_end", uploadCk = true)
public class LogHotpotJumpGameOver extends ServerBaseLog {

    @FieldTypeAnnotation(desc = "活动ID", isIndex = true, dataAttribute = "activityid")
    private int activityId;
    @FieldTypeAnnotation(desc = "玩家ID", isIndex = true)
    private long userId;
    @FieldTypeAnnotation(desc = "开局总次数", dataAttribute = "hotpot_time")
    private int totalTimes;
    @FieldTypeAnnotation(desc = "角色等级", dataAttribute = "hotpot_level")
    private int roleLv;
    @FieldTypeAnnotation(desc = "结算时的技能", dataAttribute = "hotpot_skill", saveJson = true)
    private List<String> roleSkill;
    @FieldTypeAnnotation(desc = "分数", dataAttribute = "hotpot_endscore")
    private int score;
    @FieldTypeAnnotation(desc = "回合", dataAttribute = "hotpot_round")
    private int round;
    @FieldTypeAnnotation(desc = "奖励", dataAttribute = "hotpot_get")
    private String reward;
    @FieldTypeAnnotation(desc = "是否放弃", dataAttribute = "hotpot_isup")
    private boolean giveUp;
    @FieldTypeAnnotation(desc = "时间")
    private Date logTime;

    public LogHotpotJumpGameOver(int activityId, long userId, int totalTimes, int roleLv, List<String> roleSkill, int score, int round, String reward, boolean giveUp) {
        this.activityId = activityId;
        this.userId = userId;
        this.totalTimes = totalTimes;
        this.roleLv = roleLv;
        this.roleSkill = roleSkill;
        this.score = score;
        this.round = round;
        this.reward = reward;
        this.giveUp = giveUp;
        this.logTime = new Date();
    }

    @Override
    public long getUserId() {
        return userId;
    }
}
